﻿using System;
using System.Collections.Generic;
using ProductFeedbackE = JTLeigh.Commerce.Spencer.Features.ProductFeedback.Common.Entities.ProductFeedback;

namespace JTLeigh.Commerce.Spencer.Features.ProductFeedback.Business.Behaviors
{

    /// <summary>
    /// Behavior used to select, filter, and sort product feedback.
    /// </summary>
    /// <remarks>
    /// <para>
    /// Examples of this behavior can include simple sorting (sort by feedback date), simple 
    /// filtering (filter out feedback without reviews), etc.
    /// </para>
    /// </remarks>
    public interface IProductFeedbackSelectionBehavior
    {

        /// <summary>
        /// Selects product feedback.
        /// </summary>
        /// <param name="feedback">The <see cref="Dictionary{TKey,TValue}"/> of 
        /// <see cref="ProductFeedback"/> objects to select from.</param>
        /// <returns>An ordered <see cref="IList{T}"/> of the selected <see cref="ProductFeedbackE"/>
        /// objects.</returns>
        /// <remarks>
        /// <para>
        /// This method returns all keys in <paramref name="feedback"/>.
        /// </para>
        /// </remarks>
        IList<ProductFeedbackE> SelectProductFeedback(Dictionary<Guid, ProductFeedbackE> feedback);

    }

}
